package com.ruoyi.yanjing.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yanjing.mapper.FireFightingCheckMapper;
import com.ruoyi.yanjing.domain.FireFightingCheck;
import com.ruoyi.yanjing.service.IFireFightingCheckService;

/**
 * 消防设施日常点检信息Service业务层处理
 * 
 * @author whz
 * @date 2024-12-04
 */
@Service
public class FireFightingCheckServiceImpl implements IFireFightingCheckService 
{
    @Autowired
    private FireFightingCheckMapper fireFightingCheckMapper;

    /**
     * 查询消防设施日常点检信息
     * 
     * @param id 消防设施日常点检信息主键
     * @return 消防设施日常点检信息
     */
    @Override
    public FireFightingCheck selectFireFightingCheckById(Long id)
    {
        return fireFightingCheckMapper.selectFireFightingCheckById(id);
    }

    /**
     * 查询消防设施日常点检信息列表
     * 
     * @param fireFightingCheck 消防设施日常点检信息
     * @return 消防设施日常点检信息
     */
    @Override
    public List<FireFightingCheck> selectFireFightingCheckList(FireFightingCheck fireFightingCheck)
    {
        return fireFightingCheckMapper.selectFireFightingCheckList(fireFightingCheck);
    }

    /**
     * 新增消防设施日常点检信息
     * 
     * @param fireFightingCheck 消防设施日常点检信息
     * @return 结果
     */
    @Override
    public int insertFireFightingCheck(FireFightingCheck fireFightingCheck)
    {
        fireFightingCheck.setCreateTime(DateUtils.getNowDate());
        return fireFightingCheckMapper.insertFireFightingCheck(fireFightingCheck);
    }

    /**
     * 修改消防设施日常点检信息
     * 
     * @param fireFightingCheck 消防设施日常点检信息
     * @return 结果
     */
    @Override
    public int updateFireFightingCheck(FireFightingCheck fireFightingCheck)
    {
        fireFightingCheck.setUpdateTime(DateUtils.getNowDate());
        return fireFightingCheckMapper.updateFireFightingCheck(fireFightingCheck);
    }

    /**
     * 批量删除消防设施日常点检信息
     * 
     * @param ids 需要删除的消防设施日常点检信息主键
     * @return 结果
     */
    @Override
    public int deleteFireFightingCheckByIds(Long[] ids)
    {
        return fireFightingCheckMapper.deleteFireFightingCheckByIds(ids);
    }

    /**
     * 删除消防设施日常点检信息信息
     * 
     * @param id 消防设施日常点检信息主键
     * @return 结果
     */
    @Override
    public int deleteFireFightingCheckById(Long id)
    {
        return fireFightingCheckMapper.deleteFireFightingCheckById(id);
    }
}
